$: << 'lib'
require 'rubygems'
require 'gosu'

include Gosu

class Test < Window
  def initialize
    super(640, 480, false)
    @clock = 0

    #@image = Image.new(self, "examples/media/LargeStar.png", false)
    @image = Image.new(self, "examples/media/Starfighter.bmp", false)
  end

  def update
    @clock = (@clock + 1) % 480

    puts "ESCAPE!!!" if button_down? KbEscape
  end

  def draw
    @image.draw(240, @clock, 0)
  end

  def button_down(id)
    puts "Button #{id} is down"
  end
end

w = Test.new
w.caption = "The Crazy Game Of Mine!"
w.show
